<?php
/*
 * @Author: lokei
 * @Date: 2022-09-28 20:55:13
 * @LastEditors: lokei
 * @LastEditTime: 2023-01-03 00:59:22
 * @Description: 
 */
$router->group(['prefix' => env('ROUTER_PREFIX') . 'api'], function () use ($router) {
	
	$router->group(['prefix' => 'widget/theme'], function () use ($router) {
		$router->get('get', [
			'as' => 'getTheme', 'uses' => '\App\Http\Controllers\Widget\ThemeController@get'
		]);
		$router->post('update', [
			'as' => 'updateTheme', 'uses' => '\App\Http\Controllers\Widget\ThemeController@update'
		]);
		$router->get('menu/get', [
			'as' => 'getMenuTheme', 'uses' => '\App\Http\Controllers\Widget\ThemeController@getMenu'
		]);
		$router->post('menu/set', [
			'as' => 'setMenuTheme', 'uses' => '\App\Http\Controllers\Widget\ThemeController@setMenu'
		]);
	});
	
	$router->group(['prefix' => 'widget/activity'], function () use ($router) {
		$router->get('list/get', [
			'as' => 'getActivityListTheme', 'uses' => '\App\Http\Controllers\Widget\ActivityController@getList'
		]);
		$router->post('list/update', [
			'as' => 'updateActivityListTheme', 'uses' => '\App\Http\Controllers\Widget\ActivityController@updateList'
		]);
	});
	
	$router->group(['prefix' => 'widget/banner'], function () use ($router) {
		// 获取初始化设置
		$router->get('list', [
			'as' => 'listBanner', 'uses' => '\App\Http\Controllers\Widget\BannerController@list'
		]);
		$router->post('update', [
			'as' => 'updateBanner', 'uses' => '\App\Http\Controllers\Widget\BannerController@update'
		]);
		$router->post('add', [
			'as' => 'addBanner', 'uses' => '\App\Http\Controllers\Widget\BannerController@add'
		]);
		$router->post('delete', [
			'as' => 'deleteBanner', 'uses' => '\App\Http\Controllers\Widget\BannerController@delete'
		]);
	});
	
	$router->group(['prefix' => 'widget/index'], function () use ($router) {
		$router->get('banner/get', [
			'as' => 'getIndexBannerTheme', 'uses' => '\App\Http\Controllers\Widget\IndexController@getBanner'
		]);
		$router->post('banner/set', [
			'as' => 'setIndexBannerTheme', 'uses' => '\App\Http\Controllers\Widget\IndexController@setBanner'
		]);
	});

	$router->group(['prefix' => 'widget/person'], function () use ($router) {
		$router->get('get', [
			'as' => 'getPersonTheme', 'uses' => '\App\Http\Controllers\Widget\PersonController@get'
		]);
		$router->get('nav/get', [
			'as' => 'getPersonNavTheme', 'uses' => '\App\Http\Controllers\Widget\PersonController@getNav'
		]);
		$router->post('nav/update', [
			'as' => 'updatePersonNavTheme', 'uses' => '\App\Http\Controllers\Widget\PersonController@updateNav'
		]);
		$router->get('list/get', [
			'as' => 'getPersonListTheme', 'uses' => '\App\Http\Controllers\Widget\PersonController@getList'
		]);
		$router->post('list/update', [
			'as' => 'updatePersonListTheme', 'uses' => '\App\Http\Controllers\Widget\PersonController@updateList'
		]);
	});
	
	$router->group(['prefix' => 'widget/nav'], function () use ($router) {
		// 获取初始化设置
		$router->get('list', [
			'as' => 'listNav', 'uses' => '\App\Http\Controllers\Widget\NavController@list'
		]);
		$router->get('displayList', [
			'as' => 'displayListNav', 'uses' => '\App\Http\Controllers\Widget\NavController@displayList'
		]);
		$router->post('update', [
			'as' => 'updateNav', 'uses' => '\App\Http\Controllers\Widget\NavController@update'
		]);
		$router->post('add', [
			'as' => 'addNav', 'uses' => '\App\Http\Controllers\Widget\NavController@add'
		]);
		$router->post('delete', [
			'as' => 'deleteNav', 'uses' => '\App\Http\Controllers\Widget\NavController@delete'
		]);
		$router->get('pic/get', [
			'as' => 'getNavPic', 'uses' => '\App\Http\Controllers\Widget\NavPicController@get'
		]);
		$router->post('pic/update', [
			'as' => 'updateNavPic', 'uses' => '\App\Http\Controllers\Widget\NavPicController@update'
		]);
	});
	
	$router->group(['prefix' => 'widget/menu'], function () use ($router) {
		$router->get('list', [
			'as' => 'listMenu', 'uses' => '\App\Http\Controllers\Widget\MenuController@list'
		]);
		$router->get('displayList', [
			'as' => 'displayListMenu', 'uses' => '\App\Http\Controllers\Widget\MenuController@displayList'
		]);
		$router->post('update', [
			'as' => 'updateMenu', 'uses' => '\App\Http\Controllers\Widget\MenuController@update'
		]);
	});
});
